#include <iostream>

int SearchInteger(unsigned* array, unsigned digit, unsigned size)
{
	for (unsigned i = 0; i != size; ++i)
		if (array[i] == digit)
			return static_cast<int>(i + 1);
	
	return -1;
}

int main()
{
	unsigned n;
	
	std::cin >> n;

	unsigned* array = new unsigned[n];
	for (unsigned i = 0; i != n; ++i)
		std::cin >> array[i];
	
	unsigned digit;
	std::cin >> digit;

	std::cout << SearchInteger(array, digit, n);

	delete [] array;

	return 0;
}